package cn.izeno.wx.models

import com.alibaba.fastjson.JSON
import com.alibaba.fastjson.serializer.JSONSerializer
import com.alibaba.fastjson.serializer.ObjectSerializer
import java.lang.reflect.Type

class JsonStringSerializer : ObjectSerializer {
  override fun write(serializer: JSONSerializer, any: Any?, fieldName: Any?, fieldType: Type?, features: Int) {
    serializer.write(JSON.toJSONString(any))
  }
}